const R = require('ramda')

module.exports = book => {
  const {
    id, title, name_en, author, description_cn, tags,
    grade_info, num_articles, price, created_at
  } = book
  console.log(`${title}(${name_en}, ${id})`)
  console.log(`作者：${author}`)
  console.log(`难度：${grade_info}`)
  console.log(`文章总数：${num_articles}`)
  console.log(`价格：${price}`)
  console.log(`标签：${tags}`)
  console.log(`简介：${description_cn.replace(/\s+/g, '')}`)
  console.log(`创建时间：${created_at}`)
  console.log(R.repeat('=', 80).join(''))
}
